package com.db.rome.monitoring.csv;

import com.db.rome.monitoring.DataStorage;
import com.db.rome.monitoring.domain.ApplicationComponentStatus;

/**
 * User: gryaale
 * Date: 8/12/14
 */
public class ApplicationComponentStatusCsvReader extends AbstractCsvReader {

    public ApplicationComponentStatusCsvReader(DataStorage dataStorage) {
        super(dataStorage);
    }

    @Override
    protected void process(String[] cols) {
        String shortName = cols[0];
        String componentName = cols[1];
        String status = cols[2];

        ApplicationComponentStatus applicationComponentStatus = new ApplicationComponentStatus(shortName, componentName,
                status);
        dataStorage.setApplicationComponentStatus(applicationComponentStatus);
    }
}
